﻿<Window x:Uid="Window_1" x:Class="Up2dateConsole.Dialogs.Settings.SettingsDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Up2dateConsole.Dialogs.Settings"
        mc:Ignorable="d"
        WindowStartupLocation="CenterOwner"
        ResizeMode="NoResize" 
        SizeToContent="Width"
        Height="350"
        ShowInTaskbar="False"
        Title="Settings"
        d:DataContext="{d:DesignInstance local:SettingsDialogViewModel}">

    <Window.Resources>
        <ResourceDictionary x:Uid="ResourceDictionary_1" >
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary x:Uid="ResourceDictionary_2" Source="..\..\Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>

            <Style x:Uid="Style_1" TargetType="{x:Type Button}">
                <Setter x:Uid="Setter_1" Property="Padding" Value="5,4"/>
                <Setter x:Uid="Setter_2" Property="Margin" Value="5"/>
                <Setter x:Uid="Setter_3" Property="MinWidth" Value="70"/>
            </Style>
        </ResourceDictionary>
    </Window.Resources>

    <Grid x:Uid="Grid_1" Margin="5">
        <Grid.RowDefinitions>
            <RowDefinition x:Uid="RowDefinition_1" Height="*"/>
            <RowDefinition x:Uid="RowDefinition_2" Height="Auto"/>
        </Grid.RowDefinitions>

        <TabControl x:Uid="TabControl_1" Width="550" Margin="5,5,5,10"
                    IsSynchronizedWithCurrentItem="True"
                    ItemsSource="{Binding Tabs}">
            <TabControl.Resources>
                <DataTemplate x:Uid="DataTemplate_1" DataType="{x:Type local:ConsoleSecurityTabViewModel}">
                    <local:ConsoleSecurityTab x:Uid="local:ConsoleSecurityTab_1" Margin="5"/>
                </DataTemplate>
                <DataTemplate x:Uid="DataTemplate_2" DataType="{x:Type local:ServerConnectionTabViewModel}">
                    <local:ServerConnectionTab x:Uid="local:ServerConnectionTab_1" Margin="5"/>
                </DataTemplate>
                <DataTemplate x:Uid="DataTemplate_3" DataType="{x:Type local:InstallationPolicyTabViewModel}">
                    <local:InstallationPolicyTab x:Uid="local:InstallationPolicyTab_1" Margin="5"/>
                </DataTemplate>
            </TabControl.Resources>
            <TabControl.ItemContainerStyle>
                <Style x:Uid="Style_2" TargetType="TabItem">
                    <Setter x:Uid="Setter_4" Property="Header" Value="{Binding Header}"/>
                    <Setter x:Uid="Setter_5" Property="Content" Value="{Binding}"/>
                </Style>
            </TabControl.ItemContainerStyle>            
        </TabControl>

        <StackPanel x:Uid="StackPanel_2" Grid.Row="1" HorizontalAlignment="Right" Orientation="Horizontal">
            <Button x:Uid="Button_1" Content="OK" IsDefault="True" Command="{Binding OkCommand}"/>
            <Button x:Uid="Button_2" Content="Cancel" IsCancel="True"/>
        </StackPanel>
    </Grid>
</Window>
